import React from 'react'
import { useInRouterContext } from 'react-router-dom'


export default function Test() {
      // 判断当前是否在路由的上下文中
  console.log('判断当前是否在路由里---test',useInRouterContext());

  return (
    <div>
      <h1> 判断当前是否在路由的上下文中</h1>
    </div>
  )
}
